package com.example.client.mq;

import com.example.client.test.dto.MsgDto;
import com.util.JsonUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import java.util.Map;

@Component
public class DirectReceiver {

    private Logger log = LoggerFactory.getLogger(DirectReceiver.class);

    @RabbitListener(queues = "TestDirectQueue")
    public void process(MsgDto map){
        log.info("获取消息【{}】", map);
    }
}
